<!DOCTYPE html>

<html>
<head>
  <style>
    .container {
      height: 240px;
      width: 120px;
      overflow: hidden;
      position: relative;
      z-index: 0; /* create stacking context */
      border: 1px solid black;
    }
    
    .box {
      position: relative;
      width: 100px;
      height: 100px;
      margin: 10px;
      background-color: blue;
    }
    
    .transformed {
      transform: translateZ(1px); /* non-affine transform */
    }
  </style>
  <script>
    if (window.testRunner)
      testRunner.dumpAsText();
      
    function testDone()
    {
      if (window.testRunner)
        document.getElementById('layers').innerText = internals.layerTreeAsText(document);
    }
    window.addEventListener('load', testDone, false);
  </script>
</head>
<body>
  <div class="container">
    <div class="transformed box"></div>
    <!-- This div will get a layer -->
    <div class="box"></div>
  </div>
  <!-- This div should not get a layer -->
  <div class="box"></div>
<pre id="layers">Layer tree goes here in DRT</pre>
</body>
</html>
